<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>

    button{
        width: 100px;
        height: 100px;
 
    }
</style>
<body>
    <h4>随便看看</h4>
    <button>2017韩</button>       <button>2017夏</button><br>
    <button>百搭体现</button>       <button>厚底女款</button><br>
    <button>运动女鞋</button>       <button>2017夏</button><br>
    <button>男士户外</button>       <button>男士冬季</button><br>
</body>
</html>
<script>
    var btn=document.querySelectorAll("button");
    for(i=0;i<btn.length;i++){
       btn[i].onclick=function(){
        for(i=0;i<btn.length;i++){
            btn[i].style.backgroundColor='';
        }
        this.style.backgroundColor='red';
       }
    }
</script>